<?php

class TestController extends Controller
{

    public function html()
    {
        return "test1.html";
    }

    public function php()
    {
        $this->request->setAttribute("test", "test-2");
        return "test2.php";
    }

    public function phpView()
    {
        $view = new PHPViewRenderer($this->request,"/test3.php");
        $view->assign("test", "test php view renderer class");
        return $view;
    }

    public function smarty()
    {
        $this->request->setAttribute("test", "The is test four!!");
        return "test4.tpl";
    }

    public function smartyView()
    {
        return new SmartyViewRenderer($this->request,"test4.tpl");
    }

    public function json()
    {
        return array("code" => 1, "msg" => "1234");
    }

    public function config(){
        return Config::getInstance()->conf;
    }

    public function text(){
        return "index.txt";
    }

    public function text2(){
        return new ShowPlantRenderer($this->request,"index.txt");
    }

    public function request()
    {
        return "request.php";
    }

    public function nvl(){
       echo "this is nvl return";
    }
}